<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
		<meta charset="utf-8" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
 <ul class="forminfo" style="margin-top: 20px;">
  		
    	<li><label>时间范围</label><div class="label_right">${weeknote.dateScope }</div></li>
    	<li><label>	工作周</label><div class="label_right">${weeknote.weekNo }</div></li>
    	<li><label>主要工作内容</label><div class="label_right">${weeknote.workContent }</div></li>
    	<li><label>实习心得体会</label><div class="label_right">${weeknote.workFeel }</div></li>
    	<li><label>评语</label><div class="label_right"><textarea class="long_text long_text2" name="TeacherComment" maxlength="1000"></textarea></div></li>
   	 <li><label>&nbsp;</label><input name="" type="button" class="btn" onclick="submitForm()" style="margin-top: 10px;" value="确认保存"></li>
   	 </ul> 
    <script type="text/javascript" src="js/jquery-1.7.2.js"></script>
     <script type="text/javascript" src="js/jquery.tips.js"></script>
     <script src="layer/layer.js"></script>
    <script type="text/javascript">
  var id = '${weeknote.id}';
    function submitForm() {
			if ($("textarea[name='TeacherComment']").val() == "") {
				showTips($("textarea[name='TeacherComment']"), '请填写评语!');
				return false;
			}
			$.ajax({
				type : "POST",
				url : "weeknote/marking.do",
				data : {
					id : id,
					TeacherComment :$("textarea[name='TeacherComment']").val(),
				},
				async : true,
				dataType : "json",
				success : function(data) {
					if ("success" == data.result) {
						parent.closeAll();
					} else {
						layer.alert('保存失败!', {
							skin : 'layer-ext-moon'
						});
					}
				}
			})   
    }
	</script>
</body>
</html>
